package com.liuyu.common.framework.spring.interceptor;

import lombok.extern.slf4j.Slf4j;
import org.springframework.cglib.proxy.MethodInterceptor;
import org.springframework.cglib.proxy.MethodProxy;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;

/**
 * @ClassName MethodInterceptorTest
 * @Author: liuyu
 * @Date: Created in 2021/8/16 23:51
 * @Version: 1
 * @Modified By:
 */
@Component
@Slf4j
public class MethodInterceptorTest implements MethodInterceptor {
    @Override
    public Object intercept(Object o, Method method, Object[] objects, MethodProxy methodProxy) throws Throwable {
        log.error("MethodInterceptor intercept :{},{},{},{}", o, method, methodProxy, objects);
        return o;
    }
}
